package com.salesmanager.web.entity.catalog.category;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Liutong on 6/8/15.
 */
public class CategoryTreeNode extends CategoryEntity {

    private String name;

    private String image;

    private List<CategoryTreeNode> child;

    public List<CategoryTreeNode> getChild() {
        return child;
    }

    public void setChild(List<CategoryTreeNode> child) {
        this.child = child;
    }

    public void addChild(CategoryTreeNode node){
        if (child == null){
            child = new ArrayList<CategoryTreeNode>();
        }
        child.add(node);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }
}
